<ui:composition
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>
<h:panelGrid columns="2">
	<ui:decorate template="/facelets/template/editSection.xhtml">
		<ui:param name="title" value="#{personBundle.personInfo}"/>
		<ui:param name="section" value="#{studentBean.personInfoES}"/>
		<ui:define name="view">
			<itdep:personalInfo person="#{studentBean.record}"/>
			<h:panelGrid columns="2">
				<h:outputText value="#{studentBundle.accomodationType}"/>
				<itdep:entityOutput value="#{studentBean.record.accomodationType}"
									format="{i18n.description}" locale="#{translationBean.locale}"/>
				<h:outputText value="#{dictionaryBundle.socialStatus} "/>
				<itdep:entityOutput value="#{studentBean.record.statuses}"
									format="{i18n.description}"
									locale="#{translationBean.locale}"/>
			</h:panelGrid>
		</ui:define>
		<ui:define name="edit">
			<ui:decorate template="/facelets/template/person/personalInfoEdit.xhtml">
				<ui:param name="idPrefix" value="student"/>

				<ui:param name="person" value="#{studentBean.record}"/>
				<ui:define name="AdditionalInfo">
					<h:panelGrid columns="3">
						<h:outputText value="#{personBundle.education}" styleClass="requiredField"/>
						<itdep:entitySelectMenu value="#{studentBean.record.education}" entityType="education"
												id="#{idPrefix}Education"
												required="true" format="{i18n.description}"
												styleClass="sizeCopmonent"/>
						<itdep:errorMessage for="#{idPrefix}Education"/>
						<h:outputText value="#{studentBundle.accomodationType}"
									  styleClass="requiredField"/>
						<itdep:entitySelectMenu value="#{studentBean.record.accomodationType}"
												entityType="accomodation-type"
												id="#{idPrefix}AccomodationType"
												format="{i18n.description}" required="true"
												styleClass="sizeCopmonent"/>
						<itdep:errorMessage for="#{idPrefix}AccomodationType"/>
					</h:panelGrid>
					<rich:pickList id="statusPickList" value="#{studentBean.socialStatus}"
								   converter="#{studentBean.converter}"
								   rendered="#{studentBean.resultListFilled}"
								   copyAllControlLabel="#{commonBundle.addAll}"
								   removeAllControlLabel="#{commonBundle.removeAll}"
								   copyControlLabel="#{commonBundle.addItems}"
								   removeControlLabel="#{commonBundle.remove}"
								   sourceListWidth="100px" targetListWidth="100px" listsHeight="100px">
						<itdep:entitySelectItems entityType="social-status"
												 format="{i18n.description}"/>
					</rich:pickList>
					<rich:spacer/>
					<rich:spacer/>
				</ui:define>
			</ui:decorate>
		</ui:define>
	</ui:decorate>


	<ui:decorate template="/facelets/template/editSection.xhtml">
		<ui:param name="title" value="#{personBundle.passport}"/>
		<ui:param name="section" value="#{studentBean.identityES}"/>
		<ui:define name="view">
			<itdep:passportInfo passport="#{studentBean.record.identityCard}"/>
		</ui:define>
		<ui:define name="edit">
			<ui:decorate template="/facelets/template/person/identityCardEdit.xhtml">
				<ui:param name="idPrefix" value="student"/>
				<ui:param name="identityCard" value="#{studentBean.record.identityCard}"/>
			</ui:decorate>
		</ui:define>
	</ui:decorate>

	<ui:decorate template="/facelets/template/editSection.xhtml">
		<ui:param name="title" value="#{dictionaryBundle.college}"/>
		<ui:param name="section" value="#{studentBean.studentEducationES}"/>
		<ui:define name="view">
			<h:panelGrid columns="2">
				<h:outputText value="#{studentBundle.collegeName}" styleClass="fieldName"/>
				<itdep:entityOutput value="#{studentBean.record.college}" format="{i18n.fullName}"
									locale="#{translationBean.locale}"/>
				<h:outputText value="#{studentBundle.graduationYear}" styleClass="fieldName"/>
				<h:outputText value="#{studentBean.record.graduationYear}">
					<f:convertDateTime pattern="yyyy" timeZone="EET"/>
				</h:outputText>
				<h:outputText value="#{personBundle.education}" styleClass="fieldName"/>
				<itdep:entityOutput value="#{studentBean.record.education}" format="{i18n.description}"
									locale="#{translationBean.locale}"/>
				<h:outputText value="#{dictionaryBundle.foreignLanguage}" styleClass="fieldName"/>
				<itdep:entityOutput value="#{studentBean.record.foreignLanguage}" format="{i18n.description}"
									locale="#{translationBean.locale}"/>
				<h:outputText value="#{studentBundle.studentJob}" styleClass="fieldName"/>
				<h:outputText value="#{studentBean.record.studentJob}"/>
			</h:panelGrid>
		</ui:define>
		<ui:define name="edit">
			<ui:decorate template="/facelets/template/student/studentEducationEdit.xhtml">
				<ui:param name="idPrefix" value="student"/>
				<ui:param name="actionBean" value="#{studentBean.record}"/>
				<ui:param name="anyValue" value="false"/>
			</ui:decorate>
		</ui:define>
	</ui:decorate>

	<ui:decorate template="/facelets/template/editSection.xhtml">
		<ui:param name="title" value="#{studentBundle.studentEnrollmentInfo}"/>
		<ui:param name="section" value="#{studentBean.studentEnrollmentES}"/>
		<ui:define name="view">
			<h:panelGrid columns="2">
				<h:outputText value="#{studentBundle.directiveType}"/>
				<itdep:entityOutput value="#{studentBean.enrollEvent.directive.directiveType}"
									format="{i18n.description}"
									locale="#{translationBean.locale}"/>
				<h:outputText value="#{studentBundle.numDirective}"/>
				<h:outputText value="#{studentBean.enrollEvent.directive.directiveNumber}"/>
				<h:outputText value="#{studentBundle.directiveDate}"/>
				<h:outputText value="#{studentBean.enrollEvent.directive.directiveDate}">
					<f:convertDateTime pattern="dd.MM.yyyy" timeZone="EET"/>
				</h:outputText>
				<h:outputText value="#{dictionaryBundle.eventReason}"/>
				<itdep:entityOutput value="#{studentBean.enrollEvent.eventReason}"
									format="{i18n.description}"
									locale="#{translationBean.locale}"/>
				<h:outputText value="#{dictionaryBundle.entranceType}"/>
				<itdep:entityOutput value="#{studentBean.record.entranceType}"
									format="{i18n.description}"
									locale="#{translationBean.locale}"/>
			</h:panelGrid>
		</ui:define>
		<ui:define name="edit">
			<ui:decorate template="/facelets/template/student/studentEnrollmentEdit.xhtml">
				<ui:param name="idPrefix" value="student"/>
				<ui:param name="actionBean" value="#{studentBean}"/>
			</ui:decorate>
		</ui:define>
	</ui:decorate>

</h:panelGrid>
<h:panelGrid columns="1" width="100%">

	<ui:decorate template="/facelets/template/tableTemplate.xhtml">
		<ui:param name="idPrefix" value="studentContact"/>
		<ui:param name="actionBean" value="#{studentContactBean}"/>
		<ui:define name="editPanelContext">
			<ui:decorate template="/facelets/template/person/contactEdit.xhtml">
				<ui:param name="idPrefix" value="studentContacts"/>
				<ui:param name="record" value="#{studentContactBean.record}"/>
			</ui:decorate>
		</ui:define>
		<ui:define name="tableContext">
			<rich:column width="1%">
				<f:facet name="header"><h:outputText value="#{dictionaryBundle.contactType}"/></f:facet>
				<itdep:entityOutput value="#{record.contactType}" format="{i18n.fullName}"
									locale="#{translationBean.locale}"/>
			</rich:column>
			<rich:column>
				<f:facet name="header"><h:outputText id="contactOutputText2"
													 value="#{commonBundle.contact}"/></f:facet>
				<h:outputText value="#{record.contactValue}"/>
				<br/>
			</rich:column>
		</ui:define>
	</ui:decorate>

	<ui:decorate template="/facelets/template/tableTemplate.xhtml">
		<ui:param name="idPrefix" value="studentAddress"/>
		<ui:param name="actionBean" value="#{studentAddressBean}"/>
		<ui:define name="editPanelContext">
			<ui:decorate template="/facelets/template/person/addressEditCompact.xhtml">
				<ui:param name="idPrefix" value="studentAddress"/>
				<ui:param name="address" value="#{studentAddressBean.record}"/>
				<ui:param name="addrBean" value="#{studentAddressBean}"/>
				<ui:param name="addrType" value="true"/>
			</ui:decorate>
		</ui:define>
		<ui:define name="tableContext">
			<rich:column width="1%">
				<f:facet name="header"><h:outputText value="#{dictionaryBundle.addressType}"/></f:facet>
				<itdep:entityOutput value="#{record.addressType}" format="{i18n.fullName}"
									locale="#{translationBean.locale}"/>
			</rich:column>
			<rich:column>
				<ui:decorate template="/facelets/template/person/fullAddress.xhtml"/>
			</rich:column>
		</ui:define>
	</ui:decorate>

	<ui:decorate template="/facelets/template/tableTemplate.xhtml">
		<ui:param name="idPrefix" value="studentParents"/>
		<ui:param name="actionBean" value="#{studentParentsBean}"/>
		<ui:define name="editPanelContext">
			<ui:decorate template="/facelets/template/student/studentParentsEdit.xhtml">
				<ui:param name="idPrefix" value="studentParents"/>
				<ui:param name="parent" value="#{studentParentsBean.record}"/>
				<ui:param name="address" value="true"/>
			</ui:decorate>
		</ui:define>
		<ui:define name="tableContext">
			<rich:column width="2%">
				<f:facet name="header"><h:outputText value="#{studentBundle.studentParentsName}"/></f:facet>
				<h:outputText value="#{record.name}"/>
			</rich:column>
			<rich:column width="1%">
				<f:facet name="header"><h:outputText value="#{dictionaryBundle.typeOfRelationship}"/></f:facet>
				<itdep:entityOutput value="#{record.typeOfRelationship}" format="{i18n.description}"
									locale="#{translationBean.locale}"/>
			</rich:column>
			<rich:column width="1%">
				<f:facet name="header"><h:outputText value="#{studentBundle.dateOfBirth}"/></f:facet>
				<h:outputText value="#{record.dateOfBirth}"/>
				<br/>
			</rich:column>
			<rich:column>
				<ui:decorate template="/facelets/template/person/fullAddress.xhtml">
					<ui:param name="record" value="#{record.address}"/>
				</ui:decorate>
			</rich:column>
			<rich:column>
				<f:facet name="header"><h:outputText value="#{studentBundle.work}"/></f:facet>
				<h:outputText value="#{record.work}"/>
				<br/>
			</rich:column>
		</ui:define>
	</ui:decorate>

</h:panelGrid>


</ui:composition>